Copyright: Copyright © 1995 by Neil J. Rubenking
Citation: Copyright © 1995 by Neil J. Rubenking


Closed Item
The closed-folder symbol represents a program item, INI section, or registration database branch that is "closed" (contents not displayed)


Confirm window

When the Confirm Replace item in the Options Menu is checked, COA asks you for confirmation before each replacement, using the Confirm window:

The Help button brings up this help topic. Each of the other four buttons closes the Confirm window and performs a specific function:

Yes:	Accept the replacement and continue checking.

No:	Reject the replacement, but continue checking.

All:	Accept all replacements from this one to the end of the current file.

Cancel:	Reject all replacements from this one to the end of the current file.


Contents
Change of Address Contents

Overview

Windows

Find and Replace Window

File List Window

Registration Database Window

INI File Editor

GRP File Editor

INI File Viewer

GRP File Viewer

Menus

File Menu

Viewer Menu

INI Editor Menu

GRP Editor Menu

Window Menu

Options Menu

Help Menu


Data Field Symbol
This symbol represents a data field of a program item.


Delete Section Confirmation

If you press OK, the current section will be deleted from the outline, along with all of the keys it contains.  This action is not reversible.  However, the INI file is not changed until you save the data.

If you press CANCEL, the delete operation is canceled.


File List Window

The file list window is always present - you can't close it, and you can't have more than one file list window at a time. Press the plus (+) button or select Add Files from the List menu to add one or more files to the list. Press the minus (-) button or select Remove File from the List menu to remove the highlighted file. Press the blank-square button or select Clear List from the List menu to clear the list and start over.

To view the contents of one of the files in an INI file viewer or GRP file viewer, just double-click on the filename, or highlight the file and press the view button (symbolized by a magnifying glass). To edit one of the files in an INI file editor or GRP file editor, either hold Shift and double-click on the filename or highlight it and press the edit button (symbolized by a hand holding a pen).


File Menu

GRP Editor:	Choose a GRP file and open a GRP File Editor window.

INI Editor:	Choose an INI file and open an INI File Editor window.

Exit:	Exit COA. The size and position of the Find and Replace Window, the File List Window, and the Registration Database Viewer will be saved to COA.INI, along with the status of the items on the Options menu. The saved items will be restored the next time you run COA.


File Save Confirmation

If you press YES, changes to the file will be saved before the window closes.

If you press NO, the window will close and changes to the file will be discarded.

If you press CANCEL, the window will not close.


Find Button
Find: Find the next line in the outline that matches the "Find What" string in the Find/Replace window, using options specified on the Options menu. If the end of the outline is reached, the search "wraps" back to the beginning.


Find and Replace Window

The Find and Replace Window is the heart of COA.  You can't close this window, and you can't create more than one copy of it. The DO IT button won't be enabled unless both the Find and Replace edit boxes contain text.  When you press this button, COA will go down the list of files in the File List Window making the requested change in each, then process the Registration Database.  The status bar at the bottom of the window will report what's happening.

The Options Menu choices control just how COA makes replacements.  If you've checked Match Case, COA will make the replacement only if the text matches exactly - "CAT" doesn't match "Cat".  If you've checked First Only, COA will make the change only if the Find string is at the very start of the INI key value or GRP file item being processed.  For example, with First Only checked, "C:\WINDOWS" would be found in "C:\WINDOWS\NOTEBOOK.EXE", but not in "NOTEBOOK C:\WINDOWS\README.TXT".

A problem could arise if COA made changes in a file that was also loaded into one of the viewer or editor windows. After the find and replace operation, a viewer's contents might not reflect the actual state of the file. Worse yet, an editor could contain the file's old contents, and saving that file would un-do your valuable work. To avoid any confusion or loss of data, COA automatically closes all viewer and editor windows before starting the find and replace operation. Afterward, it reloads the registration database to reflect any changes.


GRP Editor Menu

This menu is present only when the active window is a GRP Editor window.  It contains just a single item, Save file.  When you select this item, your changes are written back to the GRP file, and Program Manager is instructed to reload the changed file.  The original GRP file is stored with the extension ~GR.


GRP File Editor

Program Manager stores icons for related programs in program group windows.  The data that defines each group window is stored in a GRP file.  COA's GRP file editor window lets you edit the three kinds of data that are most likely to need changing, and displays most of the rest of the GRP file's data in read-only form.

You can open a GRP file editor window by highlighting the file in the File List Window and pressing the edit button, or by shift-double-clicking on a file in the list.  You can also select GRP File Editor from the File Menu.

The title bar contains the name Program Manager uses for the group window, which may or may not be related to the GRP file name shown below it.  Normal Rectangle is the coordinates of the group window within Program Manager when it's neither minimized nor maximized, and Minimized Location is the location of the group's icon within Program Manager when it's minimized.  Finally, a drop-down combo box lists all of the program items contained in this group window.

The lower panel contains information about the currently selected program item, including a picture of its icon.  Location is the icon's location within the group window, and Minimized is true only if the item is set up to run minimized.  If you've defined a Program Manager hotkey for the item, its numeric value and a descriptive string will be displayed.

The three items you can edit are the command line, the icon path, and the working directory.  Command line is the command that gets executed when you double-click the icon, and working directory is the directory in which Windows will start the program.  Note that these do not match the same-named items in Program Manager's Program Item Properties dialog box.  COA displays these values as they're stored in the GRP file.  Program Manager exchanges the path portion of the command line with the working directory.

Icon path is the name of the file containing the icon used for the program.  For Windows applications, this will normally be the executable file itself, but for DOS programs the icon may be taken from PROGMAN.EXE, MORICONS.DLL, or any file that contains icons.


GRP File Viewer

COA's GRP file viewer is activated by double-clicking on a GRP file in the Find and Replace window, or by pressing the Browse button in that window while a GRP file is highlighted.  It displays the GRP file as an outline, and you use the standard outline commands for navigation.

The purpose of the GRP file viewer is two-fold.  First, it lets you peek at the files you've selected, to be sure they are actually the files you want.  Second, since the aim of COA is to find text in the GRP file and replace it with new text, you can "grab" an item's  value from this outline directly into the Find and Replace window's Find What line.


Grab Line
Grab Line: "Grab" the contents of the selected line in the viewer.  Specifically, the important part of the line will be copied into the Find What line of the Find and Replace window.


Help Menu

Contents:	Open this help file at the Contents page

Search for Help On...:	Go directly to the Search dialog box to search for help on a particular topic

How to Use Help:	View the standard Windows instructions on how to use help

About Change of Address...:	View copyright, version, and system information


INI Editor Menu

This menu is present only when the active window is an INI Editor window.

Delete Section:	Delete entire current section from the in-memory image of the INI file.

Add Section:	Add a new section at the end of the in-memory image of the INI file.

Remove Key:	Remove the currently selected key from the in-memory image of the INI file.

New Key:	Create a new key at the end of the current section.

Save File:	Save the modified INI file to disk (the original is stored with the extension .~GR).  Note that the saved file may not be identical in layout to the original even if you make no changes.  Blank lines between keys will be eliminated, and a single blank line inserted before each section header.  However, comments and other non-blank lines will be retained.


INI File Editor

COA's main purpose is to automate the process of making sweeping changes throughout INI and GRP files.  However, you may find you want to do some fine-tuning on individual files.  That's what the INI file editor is for.

The INI file is displayed in outline form.  Each section header is a top-level item, and its keys and comments are displayed beneath it.  If there are comments or other lines before the first section header, the INI editor will insert a "[(none)]" header.  As you navigate the outline, any time the current line is a key line, the key name and value will be displayed at the top of the window.  Changes to the key value take effect when you leave the line or press Enter.  You can use the standard outline commands to navigate the outline.

When an INI Editor window is active, the main menu will include an INI Editor submenu whose commands let you add and remove sections and keys.

The order of sections within the INI file is not important to Windows, nor is the order of the keys within a section. However, you may wish to move the most-used sections to the top of the file, or the most-used keys to the beginning of a section. To move key A to the position just before key B, just drag key A onto key B. To move section X to the position just before section Y, drag section X onto section Y. COA will not let you drop a section on a key or vice versa, and it will not let you drop a key onto a key in a different section. Note too that you can't actually drag a key or section into the very last position. To move a key into the last position in its section, first drag it onto the current last key - this will place it just before the last key. Now drag the last key onto the key you just moved.


INI File Viewer

COA's INI file viewer is activated by double-clicking on an INI file in the Find and Replace window, or by pressing the Browse button in that window while an INI file is highlighted.  It displays the INI file as an outline, just as the INI File Editor window does, and you use the standard outline commands for navigation.

The purpose of the INI file viewer is two-fold.  First, it lets you peek at the files you've selected, to be sure they are actually the files you want.  Does BP.INI go with Borland Pascal or Bicycle Poker?  Look and see!  Second, since the aim of COA is to find text in the INI file and replace it with new text, you can "grab" a key value from this outline directly into the Find and Replace window's Find What line. And if you're not sure whether a particular string appears in the INI file, the Find button lets you seek it.


Key Symbol
This symbol represents a key, or (rarely) an empty section


List Menu

The List menu is only present when the File List Window is the active window.

Add Files:	Brings up a standard file dialog from which you can choose one or more GRP or INI files.

Remove File:	Remove the highlighted file from the list.

Clear List:	Clear the contents of the list.

Browse File:	Create a GRP File Viewer or INI File Viewer (as appropriate) and load the highlighted file into it.

Edit File:	Create a GRP File Editor or INI File Editor (as appropriate) and load the highlighted file into it.


Load Registration Database
Load: Press to load the registration database into the viewer.  If it has already been loaded, you will be asked to confirm your request to reload.


New Key Dialog

This dialog box appears when you select New Key from the INI Editor menu.  You must specify a key name.  If you leave the Value field empty, a key with a blank value will be inserted, e.g. "KeyName=".

You can't change the section in this dialog.  If you want to insert a key in a different section, select Cancel, navigate to the desired section, and then choose New Key from the menu.


Open All
Open All: Fully expand all top-level outline items.


Open Item
The open folder symbol represents a program item, INI section, or registration database branch that is "open" (contents displayed)


Options Menu

Match Case:	If checked, the string must be a perfect match including upper/lower case differences - "DELPHI" doesn't match "Delphi". If not checked, case is ignored - "wInDoWs" matches "WINDOWS"

First Only:	If checked, COA will only perform the replacement if the text being sought appears at the very beginning of the line. This is rarely necessary.

Confirm Replace:	Most of the time you'll want to let COA do its work uninterrupted. However, if you want to follow the process and confirm each replacement, check this item. COA will present you with the Confirm Window before each replacement, and let you choose what to do.

Flyover Help:	When you "rest" the mouse on many of COA's components, a tiny window will appear explaining the component's function. Remove the check next to this menu choice to disable this flyover help.

The checked/unchecked state of each of these options is stored in the initialization file COA.INI.


Overview

Change Of Address (COA) exists to get you out of the mess that's created when you move Windows applications from one drive or directory to another, or make a change in your system that changes the name of the drive your files are on.  For example, if you move everything from E:\WINWORD to D:\WINWORD, your INI files and GRP files will still contain references to the old location.  The Windows Registration Database (which will become more important in the next version of Windows) may also contain references to the old location.

At its simplest, COA lets you gather a list of GRP and INI files and specify a string to find and a string to replace it with.  When you're ready, COA will make the change in all the selected files and in the Registration Database.  if a GRP file is changed, COA will tell Program Manager to reload the new information.  If one or more INI files change, COA will offer to restart Windows for you.

COA includes outline-style browsers for INI files, GRP files, and the Registration database, so you can flip through and decide whether a particular file needs to be updated. Editor windows for GRP files and INI files are also available, in case you want to make changes by hand.  Click on a menu item or window icon in the picture above for more information.


Registration Database Window
Registration Database Viewer

The information contained in the Registration Database is used when you open or print a file from File Manager, and also for OLE support.  It associates particular file extensions with the programs that act on them, among other things.  Of course, if you move an executable file that has an association in the Registration Database, you need to update that association; COA takes care of that for you..

Your system only has one Registration Database, so only one copy of this window can exist.  It takes a little while to load the database information into the viewer, so the window is initially empty, with a LOAD button on the tool bar.  Press the Load button and the database is loaded. Loading the registration database can take a little time, so if you press the button again Delphi will ask for confirmation before reloading. Use the standard outline commands to navigate the outline.


Remove Key Confirmation

If you press OK, the selected key will be removed from the outline.  This action is not reversible.  However, the INI file is not changed until you save the data.

If you press CANCEL, the remove operation is canceled.


Shut All
Shut All: Fully collapse all top-level outline items.  A collapsed INI viewer shows only section headers; a collapsed GRP viewer shows only item names; a collapsed Registration Database Viewer just shows the root (\)


Viewer Menu

The Viewer menu is present only when the active window is one of the three types of outline-style viewers.  Its three items duplicate the functionality of the speedbar buttons on the viewer window.

Expand All:	Fully expand all top-level outline items.

Collapse All:	Fully collapse all top-level outline items.  A collapsed INI viewer shows only section headers; a collapsed GRP viewer shows only item names; a collapsed Registration Database Viewer just shows the root (\)

Grab Line:	Grab the logical portion of the selected line into the Find and Replace window's Find What line.

Find:	Find the next line in the outline that matches the text on the Find What line, in accordance with the choices set in the Options Menu.


Window Menu

COA can have many windows open at once, some full-sized and some iconized.  The Window menu helps you manage them.

Cascade:	Make all the non-iconic windows the same size (as permitted) and stack them up, each one below and to the right of the previous.  This makes it easy to pick a window, as all the title bars are visible.

Tile:	Divide up the main window's territory roughly equally among all the non-iconic windows. Note that the GRP Editor window can't be resized, and the Find and Replace window's Height can't be changed, so these two windows don't tile well.

Arrange Icons:	Line up all the iconic windows along the bottom of COA's main window in an orderly fashion.

Below these three commands is a list of all the child windows available in COA.   The currently active window has a check mark beside it, and you can activate another window by clicking on its name.


Windows Restart Confirmation

When essential INI files like WIN.INI, SYSTEM.INI, or CONTROL.INI are changed, it's possible the changes won't take effect until Windows is restarted.  If you changed any of these files, first close any DOS boxes that are open and then choose YES to restart Windows.

If the INI files you changed are specific to individual Windows applications, or if you don't want to restart Windows at this time, choose NO.


Logical portion

There are several ways to "grab" a line from one of COA's viewer windows into the Find and Replace window's Find What line.  Exactly what portion of the line (if any) gets grabbed depends on the type of window.

INI File Viewer:  If the current line is a key (i.e., has the form "key=value"), the value portion is copied.  Section headers ("[section name]") and comments (";comment") are ignored.

GRP File Viewer:  If the current line is labeled COMMAND, WORK DIR, or ICON PATH line, the portion after the label is copied.  Item names are ignored.

Registration Database Viewer:  If the current line has a value (i.e. "key = value") the value portion is copied.  Lines without a value are ignored.


Standard outline commands

Several of COA's windows display data in outline form.  If you're familiar with File Manager's outline display of a disk's directory structure, you'll find COA's outlines similar.  Each line in the outline is either a "leaf" (with no lines below it in the outline) or a "branch" (with lines below it).  Branches may be open (the items below them visible) or closed (items below them not visible).

Mouse commands

Double-click an open branch to close it completely.  Double-click a closed branch to expand it by one level.  Drag a line to the Find and Replace window's Find What line or Replace With line to copy the logical portion of that line.

Keyboard commands

Press - (minus) to collapse the selected line.  Press + (plus) to expand it by one level.  Press Shift+* to expand it completely.

Speedbar buttons

Each outline-based window in COA has several speedbar buttons.  The Open All button [image] expands all items in the outline completely.  The Shut All button [image] collapses all top-level items.  A collapsed INI viewer shows only section headers; a collapsed GRP viewer shows only item names; a collapsed Registration Database Viewer just shows the root (\).  The Grab Line button [image] grabs the logical portion of the selected line and puts it into the Find and Replace window's Find What line. The Find Button [image] locates the next line in the outline that matches the Find What line.